<?php

namespace Tuobaye\FilamentAdmin\Enums;

use Filament\Support\Contracts\HasColor;
use Filament\Support\Contracts\HasLabel;

enum AdminStatus: int implements HasLabel, HasColor
{

    case enabled = 1;
    case disabled = 0;

    public function getLabel(): ?string
    {
        return match ($this) {
            self::enabled => '正常',
            self::disabled => '锁定',
        };
    }

    public function getColor(): string|array|null
    {
        return match ($this) {
            self::enabled => 'success',
            self::disabled => 'danger',
        };
    }
}
